#-------------------------------------------------------------------
# Project Invasion of the aliens 
# name game.py
# purpose is the ammo gun takes 
#
# authors Chris L'Heureux, Tyler Austin Plante, Jackson Morse
# main author Tyler Austin Plante
#
# created 12/3/12
# Copyright (C) Tyler Austin Plante
# License New BSD\
#------------------------------------------------------------------  
import pygame, math, sys, random

class AmmoCounter():
    def __init__(self, position):
        self.surfaces = []
        if pygame.font:
            font = pygame.font.Font(None, 36)
            text = font.render("", 1, (10, 10, 10))
            textpos = text.get_rect(centerx=background.get_width()/2)
            background.blit(text, textpos)
        self.frame = len(self.surfaces)-1
        self.minFrame = 0
        self.surface = self.surfaces[self.frame]
        self.rect = self.surface.get_rect()
        self.place(position)
        self.health = 100
                
    def  __str__(self):
        return ("I'm the Player and i am LIVING " + str(self.rect.center) + str(self.speed) + str(self.living))
     
    def place(self, position):
        print "I've moved to", 
        self.rect = self.rect.move(position)
        
    def move(self):
        print "I've moved", self.speed
        self.rect = self.rect.move(self.speed)
        
    def update(self, ammo):
        print "new life is " Ammo - 1
    
    
    def reload(self, ammo):
        print "restarted ammo count"
        if ammo < 0:
            ammo = 10
 
